The present invention generally relates to an apparatus and method for area designation on a document, and more particularly to an apparatus and method for designating a rectangular area on a document, which can be used when printing a document image such as a character image on paper together with a background image covering a particular area of the paper. Further, the present invention relates to a printing apparatus which employs a means for designating a rectangular area on a document. The present invention is suitable particularly for an image processing apparatus such as a digital copier having an edit function.
Currently, a plain paper copier (PPC) having an edit function is marketed. In such a copier, the edit function makes it possible to extract or delete a particular area from a document. In the edit function, it is necessary to designate an area which is subjected to editing. Hereinafter, such an area is referred to as an edit area.
Various methods for designating an edit area have been proposed. A first method uses a numeric keypad. By key operation, an operator inputs values of X-Y coordinates of corners of a rectangular edit area which the operator wishes to designate. A second method uses an X-Y tablet. An operator touches, with a pen or the like, apexes of an area which the operator wishes to designate. In a third method, the operator designates an edit area by drawing a contour line of the edit area directly on a document by using a pen or the like. The contour line must have a halftone between the tone of an image on the document and the tone of the blank background of the document. A fourth method uses a particular sheet, which normally is the same size as the document. An edit area contour line is drawn on the particular sheet (hereinafter, such a sheet is referred to as an edit area sheet). The edit area sheet is a command sheet, which is optically scanned and the edit area is read. Thereafter, the document is scanned and document data is read therefrom.
However, the aforementioned first method has certain disadvantages in that the input operation is difficult and often leads to errors because it is necessary to measure X-Y coordinates on the document. The second method allows easy input operation, but has a disadvantage in that conventional X-Y tablets are expensive and the operator cannot visually confirm the result of the area designation. The disadvantage of the third method is that the document often becomes dirty. Additionally, if the document has a halftone image such as a photograph, the halftone image is mistaken for an edit area.
Finally, the fourth method does not have problems as described above, and is suitably applied to an image processing apparatus such as a digital copier which handles image data in digital form. It is conceivable to apply the method proposed in the U.S. patent application Ser. No. 164,901 to the fourth method in order to handle the command document. That is, an edit area document on which an edit area is represented by a corresponding figure formed by a closed loop, is optically scanned, and corresponding electrical document image data is stored in an image memory. Next, an inner area of the closed-loop figure is filled with data identical to data of the contour image line of the closed-loop figure. Generally, the contour image line is represented by binary digits, i.e., 1. Thereby, the inner area of the closed-loop figure is filled with binary digits 1, and a portion outside the closed-loop figure is filled with binary digits 0. Thereafter, data is read out from the image memory in synchronism with optical scanning of the document. Then a conjunction (AND) operation is carried out on image data read out from the image memory and document data read out from the document. Document image data having a value (binary digit) of 0 represents a white pixel, and document image data having a value of 1 represents a black pixel. On the other hand, image data of the edit area sheet having a value of 0 represents a pixel outside the closed-loop figure, and image data thereof having a value of 1 represents a pixel on or inside the closed-loop figure. As a result of the conjunction operation, image data is formed within the designated edit area. In other words, document image data outside the closed-loop figure in the conjunction operation result is deleted from the entire document image data.
However, the fourth method presents some problems when applied under the following circumstances. As is frequently seen in the headline of a newspaper and the like, characters are printed on paper together with a background image. In most cases, the background image is printed within a rectangular edit area. It is now assumed that a background image area is designated by drawing by hand a corresponding rectangular closed-loop figure on the edit area sheet. Generally, it is very difficult to draw by hand rectangular figures with perfectly straight lines. In other words, freehand rectangular figures contain lines that are wavy and deformed. Therefore, the background image printed on the edit area designated by the wavy freehand rectangular figure also has a wavy and deformed contour. On the other hand, even if a figure is drawn by using a ruler, when a slight positional error exists between a raster scanning direction and a contour line of the drawn figure, the corresponding background image area has a jagged contour.